package com.dream.fly.juststartpractice.controller;

import com.dream.fly.juststartpractice.config.BizException;
import com.dream.fly.juststartpractice.config.WebApiResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @author: 熊海梦
 * @date: 2018/11/8 15:24
 **/
@RestController
public class HelloController {

    @RequestMapping("/hello")
    public WebApiResponse<String> json(@RequestParam String name) throws BizException {
        //throw new BizException(404, "页面失踪");
        return WebApiResponse.success(name+new Date());
    }
}
